import React from "react";

let lastName = '';

export default function Demo(props) {
    const {name} = props
    console.log(lastName);
    lastName = name;
    return (<div>
        <h2>{name}</h2>
    </div>);
}